<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Music Store</title>
<link type="text/css" rel="Stylesheet" href="style/front.css" />
</head>
<body>
	<div id="wrapper">
		<div id="header">
			<div id="header-logo">
				<a href="index.jsp"><img src="style/images/logo.png" alt=""></img></a>
			</div>
			<div id="header-login">
				<a href="register">注册</a> | <a href="login">登录</a>
			</div>
			<div class="clearBoth"></div>
			<div id="header-search">
				<form action="getAlbumTitle" method="get">
					<input id="keyword" name="title" type="text" /> <input
						id="btnSearch" type="submit" value="搜索" />
				</form>
			</div>
			<div id="header-nav">
				<ul>
					<li><a href="#">首页</a></li>
					<li><a href="#">商店</a></li>
					<li><a href="#">购物车</a></li>
					<li><a href="#">个人信息</a></li>
				</ul>
				<label id="welcome">您好,${user.userName}</label>
			</div>
		</div>
		<div id="content">
			<div id="sidebar">
				<h3>唱片分类</h3>
				<ul class="categories">
					<c:forEach items="${genrelist }" var="genre">
						<li><a href="albumlist?gid=${genre.id}">${genre.name }</a></li>
					</c:forEach>
				</ul>
			</div>
			<div id="main">
				<h3 id="main-title">最新热销唱片</h3>
				<div id="hotAlbums">
					<c:forEach items="${albumlist }" var="album">
						<dl class="hotAlbumsItem">
							<dt>
								<a href="albumById?id=${album.id }"><img
									src="${path }CoverImages/${album.id }.jpg" alt="" /></a>
							</dt>
							<dd>${album.title }</dd>
						</dl>
					</c:forEach>
					<c:if test="${pageNo>1}">
						<a href="?pageNo=${pageNo-1}&title=${param.title}">[上一页]</a>
					</c:if>
					<c:if test="${pageNo<=1}">
						<a>[上一页]</a>
					</c:if>
					<a href="?pageNo=${pageNo+1}&title=${param.title}">[下一页]</a>
				</div>
			</div>
			<div class="clearBoth"></div>
		</div>
		<div id="footer">
			<div id="footer-ad">
				<img src="${path }style/images/footer.png" alt=""></img>
			</div>
			<div id="footer-contactUs">
				<p>Music Store</p>
				<p>Design by Sam Chen, July,2011.</p>
			</div>
		</div>
	</div>
</body>
</html>
